create matrix in r